package com.flying.invest.strategy.service;

import java.util.Date;

import com.flying.common.annotation.DaoCreate;
import com.flying.common.annotation.DaoQuery;
import com.flying.common.annotation.DaoRemove;
import com.flying.common.annotation.DaoUpdate;
import com.flying.common.util.Codes;
import com.flying.framework.annotation.MethodInfo;
import com.flying.framework.annotation.Param;
import com.flying.framework.annotation.Service;
import com.flying.framework.service.AbstractService;
import com.flying.framework.model.ActionResult;
import com.flying.framework.model.QueryResult;

import com.flying.invest.strategy.model.StrategyValueAverageDetail;

@Service(value="StrategyValueAverageDetailService", desc="价值平均明细")
public class StrategyValueAverageDetailService extends AbstractService{
        
	@MethodInfo("新增")
	@DaoCreate(entity=StrategyValueAverageDetail.ENTITY_NAME)
	public StrategyValueAverageDetail create(
		
			@Param(value=StrategyValueAverageDetail.USER_ID, required=true,	desc="所属用户") Long user_id,
			@Param(value=StrategyValueAverageDetail.TYPE_ID, required=true,	desc="策略类型") Long type_id,
			@Param(value=StrategyValueAverageDetail.INVEST_ID, required=true,	desc="投资项目") Long invest_id,
			@Param(value=StrategyValueAverageDetail.STRATEGY_ID, required=true,	desc="策略ID") Long strategy_id,
			@Param(value=StrategyValueAverageDetail.TARGET_AMOUNT, required=true,	desc="目标市值") Double target_amount,
			@Param(value=StrategyValueAverageDetail.INFLATION_AMOUNT, required=false,	desc="时间成本") Double inflation_amount,
			@Param(value=StrategyValueAverageDetail.TRANSACTION_TYPE, required=true,	desc="交易类型") Integer transaction_type,
			@Param(value=StrategyValueAverageDetail.STRATEGY_AMOUNT, required=true,	desc="可交易金额") Double strategy_amount,
			@Param(value=StrategyValueAverageDetail.STRATEGY_RATE, required=false,	desc="波动比率") Double strategy_rate,
			@Param(value=StrategyValueAverageDetail.AMOUNT, required=false,	desc="建议交易金额") Double amount,
			@Param(value=StrategyValueAverageDetail.PRICE, required=false,	desc="价格") Double price,
			@Param(value=StrategyValueAverageDetail.QUANTITY, required=false,	desc="数量") Double quantity,
			@Param(value=StrategyValueAverageDetail.REMARKS, required=false,	desc="说明") String remarks
		
		) {
		
		return null;
	}

	@MethodInfo("修改")
	@DaoUpdate(entity=StrategyValueAverageDetail.ENTITY_NAME)
	public ActionResult update(
		
			@Param(value=StrategyValueAverageDetail.DETAIL_ID, required=true,	desc="ID") Long detail_id,
			@Param(value=StrategyValueAverageDetail.USER_ID, required=true,	desc="所属用户") Long user_id,
			@Param(value=StrategyValueAverageDetail.TYPE_ID, required=true,	desc="策略类型") Long type_id,
			@Param(value=StrategyValueAverageDetail.INVEST_ID, required=true,	desc="投资项目") Long invest_id,
			@Param(value=StrategyValueAverageDetail.STRATEGY_ID, required=true,	desc="策略ID") Long strategy_id,
			@Param(value=StrategyValueAverageDetail.TARGET_AMOUNT, required=true,	desc="目标市值") Double target_amount,
			@Param(value=StrategyValueAverageDetail.INFLATION_AMOUNT, required=false,	desc="时间成本") Double inflation_amount,
			@Param(value=StrategyValueAverageDetail.TRANSACTION_TYPE, required=true,	desc="交易类型") Integer transaction_type,
			@Param(value=StrategyValueAverageDetail.STRATEGY_AMOUNT, required=true,	desc="可交易金额") Double strategy_amount,
			@Param(value=StrategyValueAverageDetail.STRATEGY_RATE, required=false,	desc="波动比率") Double strategy_rate,
			@Param(value=StrategyValueAverageDetail.AMOUNT, required=false,	desc="建议交易金额") Double amount,
			@Param(value=StrategyValueAverageDetail.PRICE, required=false,	desc="价格") Double price,
			@Param(value=StrategyValueAverageDetail.QUANTITY, required=false,	desc="数量") Double quantity,
			@Param(value=StrategyValueAverageDetail.REMARKS, required=false,	desc="说明") String remarks,
			@Param(value=StrategyValueAverageDetail.CREATE_TIME, required=false,	desc="创建时间") Date create_time
			
		) {
		
		return null;
	}

	@MethodInfo("删除")
	@DaoRemove(entity=StrategyValueAverageDetail.ENTITY_NAME)
	public ActionResult removeByStrategyId(
			@Param(value=StrategyValueAverageDetail.STRATEGY_ID, required=true,	desc="策略ID") Long strategy_id
		) {
		
		return null;
	}

	@MethodInfo("搜索")
	@DaoQuery(entity=StrategyValueAverageDetail.ENTITY_NAME, pageable=true, modelClass=StrategyValueAverageDetail.class)
	public QueryResult<StrategyValueAverageDetail> findAll(
			@Param(value=StrategyValueAverageDetail.STRATEGY_ID, required=false,	desc="策略ID") Long strategy_id,
			@Param(value=Codes.PAGE_NUM, 	required=false, desc="分页页号，默认0") int page,
			@Param(value=Codes.PAGE_SIZE, 	required=false, desc="分页大小，默认10") int rows) {
		return null;
	}

	@MethodInfo("查询")
	@DaoQuery(entity=StrategyValueAverageDetail.ENTITY_NAME, single=true, throwsNotFoundException=true )
	public StrategyValueAverageDetail findById(
		
			@Param(value=StrategyValueAverageDetail.DETAIL_ID, required=true,	desc="ID") Long detail_id
		) {
		return null;
	}

}